Changing dateOf format

I want to display the date of a baseline in the form MM/DD/YYYY.  I am using dateOf(bl), where bl is the baseline, but it currently gives me a date in the form 26 January 2018.  Is there a built-in function that can transform this date to 01/26/2018, or do I need to create a function on my own to change it?  It would be VERY helpful if there is a function that already exists in DXL to set the format the way you want, but, if I have to, I can create a function on my own to do it.

 

Chris


Christopher Cote - Wed Apr 17 09:07:20 EDT 2019

Re: Changing dateOf format
morast - Wed Apr 17 09:56:38 EDT 2019

https://www.ibm.com/developerworks/community/forums/html/topic?id=6158562e-3722-4e1d-b841-c797c69ffbe9

So...

Module m = current
Baseline b = getMostRecentBaseline(m)
print stringOf(dateOf(b), "MM/dd/yyyy")

 

Re: Changing dateOf format
Christopher Cote - Wed Apr 17 10:24:00 EDT 2019

Thank you again Henrik.  I tried looking for this in the forums, but wasn't able to find it.

 

Chris